< previous page page_57 next page >

Page 57
(table continued on previous page)
PropertyDescription
CausesValidationWhen set to True, this property causes the Validate event on other controls to occur. You might set the CausesValidation property to False on a command button so that the Validate event on the text box does not occur. This way, the command button can call a help routine telling the user what the required input is for a particular text box.
DefaultSet this property to a True value when you want to fire the Click event when the user presses the Enter key. Only one command button on the form may have this property set to True.
EnabledWhen this property is set to a True value, the user is able to click the button. When its set to False, the user isnt able to click this command button. In addition, the control will be grayed.
NameSet this property to the name you want to use to refer to the command button in your code. You should preface the name of the control with cmd.
PictureThis property can be set to a bitmap, GIF, or JPEG file if youve set the Style property to 1-Graphical. The picture will be displayed on the command button instead of the text in the Caption property.
StyleSet this property to 0-Standard if you want to display text on the command button, or you can set the property to 1-Graphical if you want to display a picture on the command button.

EXERCISE
Adding Command Buttons to Your Project
1. Increase the size of the form.
2. Add a command button to the Employee Information form that will allow you to close the form when the button is clicked.
3. Set the Name property to cmdClose.
4. Set the Caption property to &Close. The ampersand (&) character tells Windows to make the next letter appear underlined.
5. Set the Cancel property to True.
6. Add another command button. Set it next to the Close button.
7. Set the Name property to cmdSave.

 
< previous page page_57 next page >

If you like this book, buy it!